Range Mode and Range Median Queries on Lists and Trees
نویسندگان
چکیده
We consider algorithms for preprocessing labelled lists and trees so that, for any two nodes u and v we can answer queries of the form: What is the mode or median label in the sequence of labels on the path from u to v.
منابع مشابه
New algorithms on wavelet trees and applications to information retrieval
Wavelet trees are widely used in the representation of sequences, permutations, text collections, binary relations, discrete points, and other succinct data structures. We show, however, that this still falls short of exploiting all of the virtues of this versatile data structure. In particular we show how to use wavelet trees to solve fundamental algorithmic problems such as range quantile que...
متن کاملNovel O(H(N)+N/H(N)) Algorithmic Techniques for Several Types of Queries and Updates on Rooted Trees and Lists
In this paper we present novel algorithmic techniques with a O(H(N)+N/H(N)) time complexity for performing several types of queries and updates on general rooted trees, binary search trees and lists of size N. For rooted trees we introduce a new compressed super-node tree representation which can be used for efficiently addressing a wide range of applications. For binary search trees we discuss...
متن کاملRange Median of Minima Queries, Super-Cartesian Trees, and Text Indexing
A Range Minimum Query asks for the position of a minimal element between two specified array-indices. We consider a natural extension of this, where our further constraint is that if the minimum in a query interval is not unique, then the query should return an approximation of the median position among all positions that attain this minimum. We present a succinct preprocessing scheme using onl...
متن کاملApproximate Range Mode and Range Median Queries
We consider data structures and algorithms for preprocessing a labelled list of length n so that, for any given indices i and j we can answer queries of the form: What is the mode or median label in the sequence of labels between indices i and j. Our results are on approximate versions of this problem. Using O( n 1−α ) space, our data structure can find in O(log log 1 α n) time an element whose...
متن کاملEfficient Range Minimum Queries using Binary Indexed Trees
We present new results on Binary Indexed Trees in order to efficiently solve Range Minimum Queries. We introduce a way of using the Binary Indexed Trees so that we can answer different types of queries, e.g. the range minimum query, in O (log N ) time complexity per operation, outperforming in speed similar data structures like Segment/Range Trees or the Sparse Table Algorithm.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Nord. J. Comput.
دوره 12 شماره
صفحات -
تاریخ انتشار 2003